import { HttpClient, HttpHeaders } from '@angular/common/http';
import { AfterViewInit, Component, ViewChild } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { cloneDeep } from 'lodash-es';
import { PreviewDialog } from './core/monk-form-design/view/preview-dialog/preview-dialog.dialog';
import { PreviewFormDesignService } from './core/monk-form-design/preview-form-design/preview-form-design.service';
import { castArray } from "lodash-es";

declare const JSONPath: any;
@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss']
})
export class AppComponent implements AfterViewInit {
  @ViewChild('amberFormDesign') amberFormDesign;
  _data
  desenColumn='居住地址'
  viewDesenInfo = false
  disabledKeys = [`retention_period`,"decryption_status",'da_label_name','archive_1st_category']
  showTemplateXml ={
    "list": [
        {
            "type": "text",
            "label": "  资源信息",
            "options": {
                "textAlign": "left",
                "hidden": false,
                "showRequiredMark": false,
                "color": "rgb(0, 0, 0)",
                "fontFamily": "SimHei",
                "fontSize": "16pt"
            },
            "key": "text_1683859262169"
        },
        {
            "type": "divider",
            "label": "",
            "options": {
                "orientation": "left"
            },
            "key": "divider_1683859464499"
        },
        {
            "type": "grid",
            "label": "栅格布局",
            "columns": [
                {
                    "span": 12,
                    "list": [
                        {
                            "type": "select",
                            "label": "聚合层次",
                            "icon": "icon-xiala",
                            "options": {
                                "width": "100%",
                                "multiple": false,
                                "disabled": false,
                                "clearable": false,
                                "hidden": false,
                                "placeholder": "请选择",
                                "dynamicKey": "聚合层次",
                                "dynamic": true,
                                "options": [
                                    {
                                        "value": "da_record",
                                        "label": "件"
                                    },
                                    {
                                        "value": "da_volume",
                                        "label": "卷"
                                    }
                                ],
                                "showSearch": false,
                                "dynamicEvalFuncToken": "allowedValuesCodeEvalFunc"
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='资源标识')].property[?(@.name=='archive_type')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='资源标识')].property[?(@.name=='archive_type')].content",
                            "help": "",
                            "rules": [
                                {
                                    "required": true,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "input",
                            "label": "档案馆名称",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "杭州市档案馆",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": true
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='资源标识')].property[?(@.name=='archives_name')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='资源标识')].property[?(@.name=='archives_name')].content",
                            "help": "",
                            "important": "",
                            "rules": [
                                {
                                    "required": true,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "input",
                            "label": "立档单位类型",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='资源标识')].property[?(@.name=='fonds_unit_type')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='资源标识')].property[?(@.name=='fonds_unit_type')].content",
                            "help": "",
                            "important": "",
                            "rules": [
                                {
                                    "required": false,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "input",
                            "label": "档号",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='资源标识')].property[?(@.name=='archival_id')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='资源标识')].property[?(@.name=='archival_id')].content",
                            "help": "",
                            "rules": [
                                {
                                    "required": true,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "input",
                            "label": "门类编码",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='资源标识')].property[?(@.name=='category_code')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='资源标识')].property[?(@.name=='category_code')].content",
                            "help": "",
                            "rules": [
                                {
                                    "required": true,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "input",
                            "label": "二级门类编码",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='资源标识')].property[?(@.name=='2nd_category_code')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='资源标识')].property[?(@.name=='2nd_category_code')].content",
                            "help": "",
                            "important": "",
                            "rules": [
                                {
                                    "required": false,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "select",
                            "label": "保管期限",
                            "icon": "icon-xiala",
                            "options": {
                                "width": "100%",
                                "multiple": false,
                                "disabled": false,
                                "clearable": false,
                                "hidden": false,
                                "placeholder": "请选择",
                                "dynamicKey": "保管期限",
                                "dynamic": true,
                                "options": [
                                    {
                                        "value": "C",
                                        "label": "长期"
                                    },
                                    {
                                        "value": "D",
                                        "label": "短期"
                                    },
                                    {
                                        "value": "D10",
                                        "label": "10年"
                                    },
                                    {
                                        "value": "D100",
                                        "label": "100年"
                                    },
                                    {
                                        "value": "D15",
                                        "label": "15年"
                                    },
                                    {
                                        "value": "D25",
                                        "label": "25年"
                                    },
                                    {
                                        "value": "D30",
                                        "label": "30年"
                                    },
                                    {
                                        "value": "D5",
                                        "label": "5年"
                                    },
                                    {
                                        "value": "Y",
                                        "label": "永久"
                                    },
                                    {
                                        "value": "待定",
                                        "label": "待定"
                                    }
                                ],
                                "showSearch": false,
                                "dynamicEvalFuncToken": "allowedValuesCodeEvalFunc"
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='资源标识')].property[?(@.name=='retention_period')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='资源标识')].property[?(@.name=='retention_period')].content",
                            "help": "",
                            "rules": [
                                {
                                    "required": true,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "input",
                            "label": "机构（问题）",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='资源标识')].property[?(@.name=='classification_name')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='资源标识')].property[?(@.name=='classification_name')].content",
                            "help": "",
                            "important": "",
                            "rules": [
                                {
                                    "required": false,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "input",
                            "label": "资源标签",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='资源标识')].property[?(@.name=='resources_tag')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='资源标识')].property[?(@.name=='resources_tag')].content",
                            "help": "",
                            "important": "",
                            "rules": [
                                {
                                    "required": false,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "select",
                            "label": "档案年代",
                            "icon": "icon-xiala",
                            "options": {
                                "width": "100%",
                                "multiple": false,
                                "disabled": false,
                                "clearable": false,
                                "hidden": false,
                                "placeholder": "请选择",
                                "dynamicKey": "档案年代",
                                "dynamic": true,
                                "options": [
                                    {
                                        "value": "01",
                                        "label": "民国档案"
                                    },
                                    {
                                        "value": "02",
                                        "label": "革命历史档案"
                                    },
                                    {
                                        "value": "03",
                                        "label": "建国后档案"
                                    },
                                    {
                                        "value": "04",
                                        "label": "明清档案"
                                    }
                                ],
                                "showSearch": false,
                                "dynamicEvalFuncToken": "allowedValuesCodeEvalFunc"
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='资源标识')].property[?(@.name=='archive_year')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='资源标识')].property[?(@.name=='archive_year')].content",
                            "help": "",
                            "rules": [
                                {
                                    "required": true,
                                    "message": "必填项"
                                }
                            ]
                        }
                    ]
                },
                {
                    "span": 12,
                    "list": [
                        {
                            "type": "input",
                            "label": "档案馆代码",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "433001",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": true
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='资源标识')].property[?(@.name=='archives_code')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='资源标识')].property[?(@.name=='archives_code')].content",
                            "help": "",
                            "important": "",
                            "rules": [
                                {
                                    "required": true,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "input",
                            "label": "立档单位名称",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='资源标识')].property[?(@.name=='fonds_unit_name')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='资源标识')].property[?(@.name=='fonds_unit_name')].content",
                            "help": "",
                            "important": "",
                            "rules": [
                                {
                                    "required": true,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "input",
                            "label": "立档单位统一信用代码",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='资源标识')].property[?(@.name=='fonds_unit_usci')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='资源标识')].property[?(@.name=='fonds_unit_usci')].content",
                            "help": "",
                            "important": "",
                            "rules": [
                                {
                                    "required": false,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "input",
                            "label": "全宗号",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='资源标识')].property[?(@.name=='fonds_id')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='资源标识')].property[?(@.name=='fonds_id')].content",
                            "help": "",
                            "rules": [
                                {
                                    "required": true,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "input",
                            "label": "一级门类编码",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='资源标识')].property[?(@.name=='1st_category_code')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='资源标识')].property[?(@.name=='1st_category_code')].content",
                            "help": "",
                            "important": "",
                            "rules": [
                                {
                                    "required": true,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "input",
                            "label": "年度",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='资源标识')].property[?(@.name=='file_year')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='资源标识')].property[?(@.name=='file_year')].content",
                            "help": "",
                            "important": "",
                            "rules": [
                                {
                                    "required": true,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "input",
                            "label": "机构（问题）编码",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='资源标识')].property[?(@.name=='classification')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='资源标识')].property[?(@.name=='classification')].content",
                            "help": "",
                            "rules": [
                                {
                                    "required": false,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "input",
                            "label": "件号",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='资源标识')].property[?(@.name=='item_number')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='资源标识')].property[?(@.name=='item_number')].content",
                            "help": "",
                            "important": "",
                            "rules": [
                                {
                                    "required": true,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "input",
                            "label": "标签名称",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='资源标识')].property[?(@.name=='da_label_name')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='资源标识')].property[?(@.name=='da_label_name')].content",
                            "help": "",
                            "rules": [
                                {
                                    "required": false,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "select",
                            "label": "进馆类型",
                            "icon": "icon-xiala",
                            "options": {
                                "width": "100%",
                                "multiple": false,
                                "disabled": false,
                                "clearable": false,
                                "hidden": false,
                                "placeholder": "请选择",
                                "dynamicKey": "进馆类型",
                                "dynamic": true,
                                "options": [
                                    {
                                        "value": "01",
                                        "label": "征集进馆"
                                    },
                                    {
                                        "value": "01",
                                        "label": "到期进馆"
                                    },
                                    {
                                        "value": "03",
                                        "label": "重大活动"
                                    },
                                    {
                                        "value": "04",
                                        "label": "突发事件"
                                    },
                                    {
                                        "value": "05",
                                        "label": "机构改革"
                                    },
                                    {
                                        "value": "06",
                                        "label": "破产企业"
                                    },
                                    {
                                        "value": "07",
                                        "label": "其他"
                                    }
                                ],
                                "showSearch": false,
                                "dynamicEvalFuncToken": "allowedValuesCodeEvalFunc"
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='资源标识')].property[?(@.name=='entry_type')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='资源标识')].property[?(@.name=='entry_type')].content",
                            "help": "",
                            "rules": [
                                {
                                    "required": true,
                                    "message": "必填项"
                                }
                            ]
                        }
                    ]
                }
            ],
            "options": {
                "gutter": 0
            },
            "key": "grid_1683859330956"
        },
        {
            "type": "text",
            "label": "  访问控制信息",
            "options": {
                "textAlign": "left",
                "hidden": false,
                "showRequiredMark": false,
                "color": "rgb(0, 0, 0)",
                "fontFamily": "SimHei",
                "fontSize": "16pt"
            },
            "key": "text_1683859476039"
        },
        {
            "type": "divider",
            "label": "",
            "options": {
                "orientation": "left"
            },
            "key": "divider_1683859585485"
        },
        {
            "type": "grid",
            "label": "栅格布局",
            "columns": [
                {
                    "span": 12,
                    "list": [
                        {
                            "type": "input",
                            "label": "保密期限",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='访问控制信息')].property[?(@.name=='secrecy_period')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='访问控制信息')].property[?(@.name=='secrecy_period')].content",
                            "help": "",
                            "important": "",
                            "rules": [
                                {
                                    "required": false,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "select",
                            "label": "密级",
                            "icon": "icon-xiala",
                            "options": {
                                "width": "100%",
                                "multiple": false,
                                "disabled": false,
                                "clearable": false,
                                "hidden": false,
                                "placeholder": "请选择",
                                "dynamicKey": "密级",
                                "dynamic": true,
                                "options": [
                                    {
                                        "value": "JM",
                                        "label": "机密"
                                    },
                                    {
                                        "value": "MM",
                                        "label": "秘密"
                                    },
                                    {
                                        "value": "NB",
                                        "label": "内部"
                                    },
                                    {
                                        "value": "PT",
                                        "label": "普通"
                                    },
                                    {
                                        "value": "UM",
                                        "label": "绝密"
                                    }
                                ],
                                "showSearch": false,
                                "dynamicEvalFuncToken": "allowedValuesCodeEvalFunc"
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='访问控制信息')].property[?(@.name=='security_class')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='访问控制信息')].property[?(@.name=='security_class')].content",
                            "help": "",
                            "rules": [
                                {
                                    "required": true,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "select",
                            "label": "控制标识",
                            "icon": "icon-xiala",
                            "options": {
                                "width": "100%",
                                "multiple": false,
                                "disabled": false,
                                "clearable": false,
                                "hidden": false,
                                "placeholder": "请选择",
                                "dynamicKey": "控制标识",
                                "dynamic": true,
                                "options": [
                                    {
                                        "value": "01",
                                        "label": "控制"
                                    },
                                    {
                                        "value": "02",
                                        "label": "开放"
                                    },
                                    {
                                        "value": "03",
                                        "label": "存疑"
                                    },
                                    {
                                        "value": "04",
                                        "label": "原控"
                                    },
                                    {
                                        "value": "05",
                                        "label": "敏感"
                                    }
                                ],
                                "showSearch": false,
                                "dynamicEvalFuncToken": "allowedValuesCodeEvalFunc"
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='访问控制信息')].property[?(@.name=='control_mark')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='访问控制信息')].property[?(@.name=='control_mark')].content",
                            "help": "",
                            "rules": [
                                {
                                    "required": false,
                                    "message": "必填项"
                                }
                            ]
                        }
                    ]
                },
                {
                    "span": 12,
                    "list": [
                        {
                            "type": "select",
                            "label": "发布网段",
                            "icon": "icon-xiala",
                            "options": {
                                "width": "100%",
                                "multiple": false,
                                "disabled": false,
                                "clearable": false,
                                "hidden": false,
                                "placeholder": "请选择",
                                "dynamicKey": "发布网段",
                                "dynamic": true,
                                "options": [
                                    {
                                        "value": "01",
                                        "label": "互联网"
                                    },
                                    {
                                        "value": "02",
                                        "label": "政务外网"
                                    },
                                    {
                                        "value": "03",
                                        "label": "政务内网"
                                    },
                                    {
                                        "value": "04",
                                        "label": "内部局域网"
                                    }
                                ],
                                "showSearch": false,
                                "dynamicEvalFuncToken": "allowedValuesCodeEvalFunc",
                                "defaultValue": "01"
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='访问控制信息')].property[?(@.name=='released_network')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='访问控制信息')].property[?(@.name=='released_network')].content",
                            "help": "",
                            "rules": [
                                {
                                    "required": true,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "input",
                            "label": "开放标识",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='访问控制信息')].property[?(@.name=='open_mark')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='访问控制信息')].property[?(@.name=='open_mark')].content",
                            "help": "",
                            "important": "",
                            "rules": [
                                {
                                    "required": false,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "select",
                            "label": "解密标识",
                            "icon": "icon-xiala",
                            "options": {
                                "width": "100%",
                                "multiple": false,
                                "disabled": false,
                                "clearable": false,
                                "hidden": false,
                                "placeholder": "请选择",
                                "dynamicKey": "解密标识",
                                "dynamic": true,
                                "options": [
                                    {
                                        "value": "N",
                                        "label": "未解密"
                                    },
                                    {
                                        "value": "Y",
                                        "label": "已解密"
                                    }
                                ],
                                "showSearch": false,
                                "dynamicEvalFuncToken": "allowedValuesCodeEvalFunc"
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='访问控制信息')].property[?(@.name=='decryption_mark')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='访问控制信息')].property[?(@.name=='decryption_mark')].content",
                            "help": "",
                            "rules": [
                                {
                                    "required": false,
                                    "message": "必填项"
                                }
                            ]
                        }
                    ]
                }
            ],
            "options": {
                "gutter": 0
            },
            "key": "grid_1683859496590"
        },
        {
            "type": "text",
            "label": "  说明信息",
            "options": {
                "textAlign": "left",
                "hidden": false,
                "showRequiredMark": false,
                "color": "rgb(0, 0, 0)",
                "fontFamily": "SimHei",
                "fontSize": "16pt"
            },
            "key": "text_1683859972577"
        },
        {
            "type": "divider",
            "label": "",
            "options": {
                "orientation": "left"
            },
            "key": "divider_1683859683076"
        },
        {
            "type": "grid",
            "label": "栅格布局",
            "columns": [
                {
                    "span": 12,
                    "list": [
                        {
                            "type": "input",
                            "label": "题名",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='说明信息')].property[?(@.name=='title')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='说明信息')].property[?(@.name=='title')].content",
                            "help": "",
                            "important": "",
                            "rules": [
                                {
                                    "required": true,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "date",
                            "label": "形成时间",
                            "icon": "icon-calendar",
                            "options": {
                                "width": "100%",
                                "defaultValue": "",
                                "rangeDefaultValue": [],
                                "range": false,
                                "showTime": false,
                                "disabled": false,
                                "hidden": false,
                                "clearable": false,
                                "placeholder": "请选择",
                                "rangePlaceholder": [
                                    "开始时间",
                                    "结束时间"
                                ],
                                "format": "YYYY-MM-DD"
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='说明信息')].property[?(@.name=='date')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='说明信息')].property[?(@.name=='date')].content",
                            "help": "",
                            "rules": [
                                {
                                    "required": true,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "input",
                            "label": "附件",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='说明信息')].property[?(@.name=='accessory')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='说明信息')].property[?(@.name=='accessory')].content",
                            "help": "",
                            "important": "",
                            "rules": [
                                {
                                    "required": false,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "input",
                            "label": "总页数",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='说明信息')].property[?(@.name=='total_pages')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='说明信息')].property[?(@.name=='total_pages')].content",
                            "help": "",
                            "important": "",
                            "rules": [
                                {
                                    "required": false,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "input",
                            "label": "主题",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='说明信息')].property[?(@.name=='subject')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='说明信息')].property[?(@.name=='subject')].content",
                            "help": "",
                            "important": "",
                            "rules": [
                                {
                                    "required": false,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "input",
                            "label": "描述信息",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='说明信息')].property[?(@.name=='description')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='说明信息')].property[?(@.name=='description')].content",
                            "help": "",
                            "important": "",
                            "rules": [
                                {
                                    "required": false,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "input",
                            "label": "是否电子公文",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='说明信息')].property[?(@.name=='whether_oa')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='说明信息')].property[?(@.name=='whether_oa')].content",
                            "help": "",
                            "important": "",
                            "rules": [
                                {
                                    "required": false,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "select",
                            "label": "载体形态",
                            "icon": "icon-xiala",
                            "options": {
                                "width": "100%",
                                "multiple": false,
                                "disabled": false,
                                "clearable": false,
                                "hidden": false,
                                "placeholder": "请选择",
                                "dynamicKey": "实物载体类型",
                                "dynamic": true,
                                "options": [
                                    {
                                        "value": "01",
                                        "label": "纸质"
                                    },
                                    {
                                        "value": "02",
                                        "label": "照片"
                                    },
                                    {
                                        "value": "03",
                                        "label": "录音"
                                    },
                                    {
                                        "value": "04",
                                        "label": "录像"
                                    },
                                    {
                                        "value": "05",
                                        "label": "实物"
                                    },
                                    {
                                        "value": "06",
                                        "label": "光盘"
                                    },
                                    {
                                        "value": "07",
                                        "label": "软盘"
                                    },
                                    {
                                        "value": "08",
                                        "label": "字画"
                                    },
                                    {
                                        "value": "09",
                                        "label": "印章"
                                    },
                                    {
                                        "value": "10",
                                        "label": "底片"
                                    },
                                    {
                                        "value": "11",
                                        "label": "数码照片"
                                    },
                                    {
                                        "value": "12",
                                        "label": "电子文件"
                                    },
                                    {
                                        "value": "13",
                                        "label": "奖状"
                                    },
                                    {
                                        "value": "14",
                                        "label": "奖杯"
                                    },
                                    {
                                        "value": "15",
                                        "label": "奖牌"
                                    },
                                    {
                                        "value": "16",
                                        "label": "证书"
                                    },
                                    {
                                        "value": "17",
                                        "label": "锦旗"
                                    },
                                    {
                                        "value": "18",
                                        "label": "有实体的数码照片"
                                    }
                                ],
                                "showSearch": false,
                                "dynamicEvalFuncToken": "allowedValuesCodeEvalFunc"
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='说明信息')].property[?(@.name=='carrier_morphology')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='说明信息')].property[?(@.name=='carrier_morphology')].content",
                            "help": "",
                            "rules": [
                                {
                                    "required": true,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "select",
                            "label": "载体类型",
                            "icon": "icon-xiala",
                            "options": {
                                "width": "100%",
                                "multiple": false,
                                "disabled": false,
                                "clearable": false,
                                "hidden": false,
                                "placeholder": "请选择",
                                "dynamicKey": "载体类型",
                                "dynamic": true,
                                "options": [
                                    {
                                        "value": "01",
                                        "label": "实体"
                                    },
                                    {
                                        "value": "02",
                                        "label": "电子"
                                    }
                                ],
                                "showSearch": false,
                                "dynamicEvalFuncToken": "allowedValuesCodeEvalFunc"
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='说明信息')].property[?(@.name=='carrier_type')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='说明信息')].property[?(@.name=='carrier_type')].content",
                            "help": "",
                            "rules": [
                                {
                                    "required": true,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "input",
                            "label": "载体规格",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='说明信息')].property[?(@.name=='carrier_specification')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='说明信息')].property[?(@.name=='carrier_specification')].content",
                            "help": "",
                            "important": "",
                            "rules": [
                                {
                                    "required": true,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "input",
                            "label": "备注",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='说明信息')].property[?(@.name=='remark')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='说明信息')].property[?(@.name=='remark')].content",
                            "help": "",
                            "important": "",
                            "rules": [
                                {
                                    "required": false,
                                    "message": "必填项"
                                }
                            ]
                        }
                    ]
                },
                {
                    "span": 12,
                    "list": [
                        {
                            "type": "input",
                            "label": "文件编号",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='说明信息')].property[?(@.name=='document_number')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='说明信息')].property[?(@.name=='document_number')].content",
                            "help": "",
                            "important": "",
                            "rules": [
                                {
                                    "required": false,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "input",
                            "label": "责任者",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='说明信息')].property[?(@.name=='author')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='说明信息')].property[?(@.name=='author')].content",
                            "help": "",
                            "important": "",
                            "rules": [
                                {
                                    "required": true,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "input",
                            "label": "附注",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='说明信息')].property[?(@.name=='annotation')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='说明信息')].property[?(@.name=='annotation')].content",
                            "help": "",
                            "important": "",
                            "rules": [
                                {
                                    "required": false,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "input",
                            "label": "归一件标识",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='说明信息')].property[?(@.name=='lumping_mark')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='说明信息')].property[?(@.name=='lumping_mark')].content",
                            "help": "",
                            "important": "",
                            "rules": [
                                {
                                    "required": false,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "input",
                            "label": "提要",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='说明信息')].property[?(@.name=='file_summary')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='说明信息')].property[?(@.name=='file_summary')].content",
                            "help": "",
                            "important": "",
                            "rules": [
                                {
                                    "required": false,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "select",
                            "label": "原文类型",
                            "icon": "icon-xiala",
                            "options": {
                                "width": "100%",
                                "multiple": false,
                                "disabled": false,
                                "clearable": false,
                                "hidden": false,
                                "placeholder": "请选择",
                                "dynamicKey": "原文类型",
                                "dynamic": true,
                                "options": [
                                    {
                                        "value": "DZWJ",
                                        "label": "原生电子"
                                    },
                                    {
                                        "value": "SZH",
                                        "label": "数字化"
                                    },
                                    {
                                        "value": "WQW",
                                        "label": "无全文"
                                    }
                                ],
                                "showSearch": false,
                                "dynamicEvalFuncToken": "allowedValuesCodeEvalFunc"
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='说明信息')].property[?(@.name=='original_text_type')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='说明信息')].property[?(@.name=='original_text_type')].content",
                            "help": "",
                            "rules": [
                                {
                                    "required": true,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "select",
                            "label": "原文标识",
                            "icon": "icon-xiala",
                            "options": {
                                "width": "100%",
                                "multiple": false,
                                "disabled": false,
                                "clearable": false,
                                "hidden": false,
                                "placeholder": "请选择",
                                "dynamicKey": "是否有原文",
                                "dynamic": true,
                                "options": [
                                    {
                                        "value": "false",
                                        "label": "无"
                                    },
                                    {
                                        "value": "true",
                                        "label": "有"
                                    }
                                ],
                                "showSearch": false,
                                "dynamicEvalFuncToken": "allowedValuesCodeEvalFunc"
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='说明信息')].property[?(@.name=='exist_document')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='说明信息')].property[?(@.name=='exist_document')].content",
                            "help": "",
                            "rules": [
                                {
                                    "required": true,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "input",
                            "label": "所有原文容量单位",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='说明信息')].property[?(@.name=='file_capacity')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='说明信息')].property[?(@.name=='file_capacity')].content",
                            "help": "",
                            "important": "",
                            "rules": [
                                {
                                    "required": false,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "input",
                            "label": "载体单位",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='说明信息')].property[?(@.name=='carrier_unit')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='说明信息')].property[?(@.name=='carrier_unit')].content",
                            "help": "",
                            "important": "",
                            "rules": [
                                {
                                    "required": true,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "input",
                            "label": "载体数量",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='说明信息')].property[?(@.name=='material_num')].content",
                            "key": "$.record.block[?(@.name=='归档信息')].block[?(@.name=='说明信息')].property[?(@.name=='material_num')].content",
                            "help": "",
                            "important": "",
                            "rules": [
                                {
                                    "required": false,
                                    "message": "必填项"
                                }
                            ]
                        }
                    ]
                }
            ],
            "options": {
                "gutter": 0
            },
            "key": "grid_1683859701009"
        },
        {
            "type": "text",
            "label": "电子文件信息",
            "options": {
                "textAlign": "left",
                "hidden": false,
                "showRequiredMark": false,
                "color": "rgb(0, 0, 0)",
                "fontFamily": "SimHei",
                "fontSize": "16pt"
            },
            "key": "text_1683860006167"
        },
        {
            "type": "divider",
            "label": "",
            "options": {
                "orientation": "left"
            },
            "key": "divider_1683860026651"
        },
        {
            "type": "grid",
            "label": "栅格布局",
            "columns": [
                {
                    "span": 12,
                    "list": [
                        {
                            "type": "input",
                            "label": "电子文件号",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='业务内容')].block[?(@.name=='内容信息')].property[?(@.name=='edoc_id')].content",
                            "key": "$.record.block[?(@.name=='业务内容')].block[?(@.name=='内容信息')].property[?(@.name=='edoc_id')].content",
                            "help": "",
                            "important": "",
                            "rules": [
                                {
                                    "required": false,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "input",
                            "label": "文种",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='业务内容')].block[?(@.name=='内容信息')].property[?(@.name=='doc_type')].content",
                            "key": "$.record.block[?(@.name=='业务内容')].block[?(@.name=='内容信息')].property[?(@.name=='doc_type')].content",
                            "help": "",
                            "important": "",
                            "rules": [
                                {
                                    "required": false,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "input",
                            "label": "发文字号",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='业务内容')].block[?(@.name=='内容信息')].property[?(@.name=='doc_number')].content",
                            "key": "$.record.block[?(@.name=='业务内容')].block[?(@.name=='内容信息')].property[?(@.name=='doc_number')].content",
                            "help": "",
                            "important": "",
                            "rules": [
                                {
                                    "required": false,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "input",
                            "label": "发文机关",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='业务内容')].block[?(@.name=='内容信息')].property[?(@.name=='doc_author')].content",
                            "key": "$.record.block[?(@.name=='业务内容')].block[?(@.name=='内容信息')].property[?(@.name=='doc_author')].content",
                            "help": "",
                            "important": "",
                            "rules": [
                                {
                                    "required": true,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "input",
                            "label": "抄送机关",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='业务内容')].block[?(@.name=='内容信息')].property[?(@.name=='copyto_units')].content",
                            "key": "$.record.block[?(@.name=='业务内容')].block[?(@.name=='内容信息')].property[?(@.name=='copyto_units')].content",
                            "help": "",
                            "important": "",
                            "rules": [
                                {
                                    "required": false,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "input",
                            "label": "形成部门",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='业务内容')].block[?(@.name=='内容信息')].property[?(@.name=='doc_department')].content",
                            "key": "$.record.block[?(@.name=='业务内容')].block[?(@.name=='内容信息')].property[?(@.name=='doc_department')].content",
                            "help": "",
                            "important": "",
                            "rules": [
                                {
                                    "required": false,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "input",
                            "label": "页数",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='业务内容')].block[?(@.name=='内容信息')].property[?(@.name=='doc_pages')].content",
                            "key": "$.record.block[?(@.name=='业务内容')].block[?(@.name=='内容信息')].property[?(@.name=='doc_pages')].content",
                            "help": "",
                            "important": "",
                            "rules": [
                                {
                                    "required": false,
                                    "message": "必填项"
                                }
                            ]
                        }
                    ]
                },
                {
                    "span": 12,
                    "list": [
                        {
                            "type": "input",
                            "label": "收发文标识",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='业务内容')].block[?(@.name=='内容信息')].property[?(@.name=='doc_tr_id')].content",
                            "key": "$.record.block[?(@.name=='业务内容')].block[?(@.name=='内容信息')].property[?(@.name=='doc_tr_id')].content",
                            "help": "",
                            "important": "",
                            "rules": [
                                {
                                    "required": false,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "input",
                            "label": "标题",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='业务内容')].block[?(@.name=='内容信息')].property[?(@.name=='doc_title')].content",
                            "key": "$.record.block[?(@.name=='业务内容')].block[?(@.name=='内容信息')].property[?(@.name=='doc_title')].content",
                            "help": "",
                            "important": "",
                            "rules": [
                                {
                                    "required": true,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "date",
                            "label": "成文日期",
                            "icon": "icon-calendar",
                            "options": {
                                "width": "100%",
                                "defaultValue": "",
                                "rangeDefaultValue": [],
                                "range": false,
                                "showTime": false,
                                "disabled": false,
                                "hidden": false,
                                "clearable": false,
                                "placeholder": "请选择",
                                "rangePlaceholder": [
                                    "开始时间",
                                    "结束时间"
                                ],
                                "format": "YYYY-MM-DD"
                            },
                            "model": "$.record.block[?(@.name=='业务内容')].block[?(@.name=='内容信息')].property[?(@.name=='doc_pub_date')].content",
                            "key": "$.record.block[?(@.name=='业务内容')].block[?(@.name=='内容信息')].property[?(@.name=='doc_pub_date')].content",
                            "help": "",
                            "rules": [
                                {
                                    "required": true,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "input",
                            "label": "主送机关",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='业务内容')].block[?(@.name=='内容信息')].property[?(@.name=='to_units')].content",
                            "key": "$.record.block[?(@.name=='业务内容')].block[?(@.name=='内容信息')].property[?(@.name=='to_units')].content",
                            "help": "",
                            "important": "",
                            "rules": [
                                {
                                    "required": false,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "date",
                            "label": "印发日期",
                            "icon": "icon-calendar",
                            "options": {
                                "width": "100%",
                                "defaultValue": "",
                                "rangeDefaultValue": [],
                                "range": false,
                                "showTime": false,
                                "disabled": false,
                                "hidden": false,
                                "clearable": false,
                                "placeholder": "请选择",
                                "rangePlaceholder": [
                                    "开始时间",
                                    "结束时间"
                                ],
                                "format": "YYYY-MM-DD"
                            },
                            "model": "$.record.block[?(@.name=='业务内容')].block[?(@.name=='内容信息')].property[?(@.name=='doc_publication_date')].content",
                            "key": "$.record.block[?(@.name=='业务内容')].block[?(@.name=='内容信息')].property[?(@.name=='doc_publication_date')].content",
                            "help": "",
                            "rules": [
                                {
                                    "required": false,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "input",
                            "label": "来源系统",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='业务内容')].block[?(@.name=='内容信息')].property[?(@.name=='system_name')].content",
                            "key": "$.record.block[?(@.name=='业务内容')].block[?(@.name=='内容信息')].property[?(@.name=='system_name')].content",
                            "help": "",
                            "important": "",
                            "rules": [
                                {
                                    "required": false,
                                    "message": "必填项"
                                }
                            ]
                        },
                        {
                            "type": "input",
                            "label": "附件说明",
                            "icon": "icon-write",
                            "options": {
                                "type": "text",
                                "width": "100%",
                                "defaultValue": "",
                                "placeholder": "请输入",
                                "clearable": false,
                                "maxLength": null,
                                "addonBefore": "",
                                "addonAfter": "",
                                "hidden": false,
                                "disabled": false
                            },
                            "model": "$.record.block[?(@.name=='业务内容')].block[?(@.name=='内容信息')].property[?(@.name=='doc_attachments')].content",
                            "key": "$.record.block[?(@.name=='业务内容')].block[?(@.name=='内容信息')].property[?(@.name=='doc_attachments')].content",
                            "help": "",
                            "important": "",
                            "rules": [
                                {
                                    "required": false,
                                    "message": "必填项"
                                }
                            ]
                        }
                    ]
                }
            ],
            "options": {
                "gutter": 0
            },
            "key": "grid_1683860029914"
        }
    ],
    "config": {
        "layout": "horizontal",
        "labelCol": {
            "xs": 4,
            "sm": 4,
            "md": 4,
            "lg": 4,
            "xl": 4,
            "xxl": 4
        },
        "labelWidth": 100,
        "labelLayout": "flex",
        "wrapperCol": {
            "xs": 18,
            "sm": 18,
            "md": 18,
            "lg": 18,
            "xl": 18,
            "xxl": 18
        },
        "hideRequiredMark": false,
        "customStyle": "{\"padding-left\":\"12px\"}",
        "previewWidth": 800
    }
}

  initValue :any= {
    "record": {
        "version_no": "18",
        "metadata_scheme_name": "文书档案（件）",
        "block": [
            {
                "name": "归档信息",
                "block": [
                    {
                        "name": "资源标识",
                        "property": [
                            {
                                "name": "archive_1st_category",
                                "title": "一级门类编码",
                                "content": "WS"
                            },
                            {
                                "name": "2nd_category_code",
                                "title": "二级门类编码"
                            },
                            {
                                "name": "item_number",
                                "title": "件号",
                                "content": "00004"
                            },
                            {
                                "name": "retention_period",
                                "title": "保管期限",
                                "content": "Y"
                            },
                            {
                                "name": "fonds_id",
                                "title": "全宗号",
                                "content": "J001"
                            },
                            {
                                "name": "classification",
                                "title": "分类号"
                            },
                            {
                                "name": "classification_name",
                                "title": "分类名称"
                            },
                            {
                                "name": "file_year",
                                "title": "年度",
                                "content": "2002"
                            },
                            {
                                "name": "da_label_name",
                                "title": "标签名称"
                            },
                            {
                                "name": "archival_id",
                                "title": "档号",
                                "content": "J001-2002-永久-00004"
                            },
                            {
                                "name": "archive_year",
                                "title": "档案年代",
                                "content": "04"
                            },
                            {
                                "name": "archives_code",
                                "title": "档案馆代码",
                                "content": "433002"
                            },
                            {
                                "name": "archives_name",
                                "title": "档案馆名称",
                                "content": "杭州市档案馆"
                            },
                            {
                                "name": "fonds_unit_name",
                                "title": "立档单位名称",
                                "content": "中共杭州市委"
                            },
                            {
                                "name": "fonds_unit_type",
                                "title": "立档单位类型",
                                "content": "机关"
                            },
                            {
                                "name": "fonds_unit_usci",
                                "title": "立档单位统一信用代码"
                            },
                            {
                                "name": "archive_type",
                                "title": "聚合层次"
                            },
                            {
                                "name": "resources_tag",
                                "title": "资源标签"
                            },
                            {
                                "name": "entry_type",
                                "title": "进馆类型"
                            },
                            {
                                "name": "category_code",
                                "title": "门类编码",
                                "content": "WS·B"
                            }
                        ]
                    },
                    {
                        "name": "访问控制信息",
                        "property": [
                            {
                                "name": "secrecy_period",
                                "title": "保密期限"
                            },
                            {
                                "name": "released_network",
                                "title": "发布网段",
                                "content": "04"
                            },
                            {
                                "name": "security_class",
                                "title": "密级",
                                "content": "L1"
                            },
                            {
                                "name": "decryption_mark",
                                "title": "解密标识"
                            },
                            {
                                "name": "control_mark",
                                "title": "控制标识",
                                "content": "01"
                            },
                            {
                                "name": "open_mark",
                                "title": "开放标识"
                            }
                        ]
                    },
                    {
                        "name": "说明信息",
                        "property": [
                            {
                                "name": "original_text_type",
                                "title": "原文类型",
                                "content": "WQW"
                            },
                            {
                                "name": "subject",
                                "title": "主题"
                            },
                            {
                                "name": "text_identification",
                                "title": "原文标识",
                                "content": "否"
                            },
                            {
                                "name": "remark",
                                "title": "备注"
                            },
                            {
                                "name": "page_number",
                                "title": "张页号",
                                "content": "0.0"
                            },
                            {
                                "name": "lumping_mark",
                                "title": "归一件标识"
                            },
                            {
                                "name": "date",
                                "title": "形成时间",
                                "content": "2002-01-16T00:00"
                            },
                            {
                                "name": "total_pages",
                                "title": "总页数",
                                "content": "136"
                            },
                            {
                                "name": "file_capacity",
                                "title": "所有原文容量单位"
                            },
                            {
                                "name": "description",
                                "title": "描述信息"
                            },
                            {
                                "name": "file_summary",
                                "title": "提要"
                            },
                            {
                                "name": "digitized_status",
                                "title": "数字化状态",
                                "content": "01"
                            },
                            {
                                "name": "archive_type",
                                "title": "整理方式",
                                "content": "da_record"
                            },
                            {
                                "name": "document_number",
                                "title": "文件编号"
                            },
                            {
                                "name": "exist_document",
                                "title": "是否有原文",
                                "content": "false"
                            },
                            {
                                "name": "whether_oa",
                                "title": "是否电子公文"
                            },
                            {
                                "name": "binding_method",
                                "title": "装订方式"
                            },
                            {
                                "name": "author",
                                "title": "责任者",
                                "content": "中共杭州市委"
                            },
                            {
                                "name": "carrier_unit",
                                "title": "载体单位"
                            },
                            {
                                "name": "carrier_morphology",
                                "title": "载体形态",
                                "content": "01"
                            },
                            {
                                "name": "material_num",
                                "title": "载体数量"
                            },
                            {
                                "name": "carrier_type",
                                "title": "载体类型",
                                "content": "01"
                            },
                            {
                                "name": "carrier_specification",
                                "title": "载体规格"
                            },
                            {
                                "name": "accessory",
                                "title": "附件"
                            },
                            {
                                "name": "annotation",
                                "title": "附注",
                                "content": "手写会议记录"
                            },
                            {
                                "name": "title",
                                "title": "题名",
                                "content": "八届市委第142次常委会议记录：关于市人大会议换届工作报告及有关工作；市政协会议换届工作报告及有关工作；市农村工作会议报告和有关工作；省党代会代表推荐工作方案；关于人事干部工作"
                            }
                        ]
                    },
                    {
                        "name": "管理信息",
                        "property": [
                            {
                                "name": "whether_filed",
                                "title": "是否已归档",
                                "content": "true"
                            },
                            {
                                "name": "identity_by",
                                "title": "鉴定人"
                            },
                            {
                                "name": "identity_date",
                                "title": "鉴定时间"
                            },
                            {
                                "name": "physical_archive_location",
                                "title": "实体存址号"
                            },
                            {
                                "name": "open_class",
                                "title": "开放状态",
                                "content": "D"
                            },
                            {
                                "name": "authenticate_status",
                                "title": "鉴定状态",
                                "content": "待鉴定"
                            },
                            {
                                "name": "publish_status",
                                "title": "发布状态",
                                "content": "待发布"
                            },
                            {
                                "name": "is_opening_appraisal_end",
                                "title": "开放鉴定结束标识"
                            },
                            {
                                "name": "is_opening_appraisal",
                                "title": "是否开放鉴定中"
                            },
                            {
                                "name": "is_destroy_appraisal",
                                "title": "是否销毁鉴定中"
                            },
                            {
                                "name": "is_destroy_appraisal_end",
                                "title": "销毁鉴定结束标识"
                            },
                            {
                                "name": "is_security_appraisal",
                                "title": "是否密级鉴定中"
                            },
                            {
                                "name": "is_security_appraisal_end",
                                "title": "密级鉴定结束标识"
                            },
                            {
                                "name": "is_copied_to_usage_lib",
                                "title": "同步利用库标识"
                            },
                            {
                                "name": "is_copied_to_thematic_lib",
                                "title": "同步专题库标识"
                            },
                            {
                                "name": "is_on_warehouse",
                                "title": "在库情况标识"
                            },
                            {
                                "name": "is_copied_to_share_archives",
                                "title": "档案共享标识"
                            },
                            {
                                "name": "da_validate_status",
                                "title": "四性检测状态"
                            },
                            {
                                "name": "da_long_save_sync_status",
                                "title": "同步长久保存库状态"
                            },
                            {
                                "name": "joined_subject",
                                "title": "同步专题库名称"
                            }
                        ]
                    }
                ]
            },
            {
                "name": "业务内容",
                "block": [
                    {
                        "name": "过程信息",
                        "property": [
                            {
                                "name": "name",
                                "title": "环节名称"
                            },
                            {
                                "name": "operator",
                                "title": "处理人"
                            },
                            {
                                "name": "operate_date",
                                "title": "时间"
                            },
                            {
                                "name": "proc_node_unit",
                                "title": "处理部门"
                            },
                            {
                                "name": "proc_node_opinion",
                                "title": "处理意见"
                            }
                        ]
                    },
                    {
                        "name": "内容信息",
                        "property": [
                            {
                                "name": "doc_attachments",
                                "title": "附件说明"
                            },
                            {
                                "name": "edoc_id",
                                "title": "电子文件号"
                            },
                            {
                                "name": "doc_tr_id",
                                "title": "收发文标识"
                            },
                            {
                                "name": "doc_type",
                                "title": "文种"
                            },
                            {
                                "name": "doc_title",
                                "title": "标题"
                            },
                            {
                                "name": "doc_number",
                                "title": "发文字号"
                            },
                            {
                                "name": "doc_pub_date",
                                "title": "成文日期",
                                "content": "2002-01-16T00:00"
                            },
                            {
                                "name": "doc_author",
                                "title": "发文机关"
                            },
                            {
                                "name": "to_units",
                                "title": "主送机关"
                            },
                            {
                                "name": "copyto_units",
                                "title": "抄送机关"
                            },
                            {
                                "name": "doc_publication_date",
                                "title": "印发日期"
                            },
                            {
                                "name": "doc_department",
                                "title": "形成部门"
                            },
                            {
                                "name": "manuscript",
                                "title": "稿本"
                            },
                            {
                                "name": "doc_pages",
                                "title": "页数"
                            },
                            {
                                "name": "system_name",
                                "title": "来源系统"
                            }
                        ]
                    }
                ]
            },
            {
                "name": "电子文件"
            }
        ],
        "metadata_scheme_code": "WS·A-RECORD"
    }
}



  fields = [
    "input",
    "textarea",
    "number",
    "select",
    "checkbox",
    "radio",
    "date",
    //"time",
    "rate",
    "slider",
    // "uploadFile",
    // "uploadImg",
    // 'uploadCustom',
    // "cascader",
    // "treeSelect",
    "batch",
    "selectInputList",
    // "editor",
    "switch",
    "button",
    "alert",
    "text",
    "html",
    "divider",
    "card",
    "tabs",
    "grid",
    "table",
    "collapse",
    "block"
  ]
  constructor(
    private _http: HttpClient,
    public dialog: MatDialog,
    private _previewFormDesignService: PreviewFormDesignService,
  ) {
    const { initValue, showTemplateXml, width } = this.getInitInfo(
        this.showTemplateXml,
        this.initValue);
        console.log('initValue',initValue);
        
    this.initValue = initValue;
  }
  ngAfterViewInit(): void {
    this.init()
    // this.amberFormDesign.init(this._data)
  }

  getInitInfo(showTemplate, jsonMetadata) {
    console.log(jsonMetadata);
    
    const showTemplateXml = showTemplate;
    const result = this._previewFormDesignService.getFlatList({list: showTemplateXml.list})
    const final = {}
    for (const item of result) {
      const path = item.key.replace('.content', '')
      const result = JSONPath.JSONPath({ path: path, json: jsonMetadata, resultType: 'all' })
      if (result[0]?.value?.content) {
        final[item.key] = result[0]?.value?.content
      }
    }
    const find = result.find(item => item.type == 'process')
    if (find) {
      const node = this.getProcessNode((jsonMetadata as any)?.record)
      if (node) {
        final[find.key] = node
      }
    }
    const width = showTemplateXml.config.previewWidth;

    return {
      initValue: final,
      showTemplateXml,
      width
    }
  }
  getProcessNode(json) {
    const formatShowJson = (jsonData) => {
      if (jsonData.node) {
        return castArray(jsonData.node);
      }
      if (jsonData.block) {
        const blocks = castArray(jsonData.block)
        for (let i = 0; i < blocks.length; i++) {
          const result = formatShowJson(blocks[i])
          if (result) {
            return result;
          }
        }
      }
      return null;
    }
    return formatShowJson(json)
  }
  async init() {
    // const data = await this._http.get('/assets/data/json3.json', {
    //   //responseType: 'text'
    // }).toPromise()
    // console.log(data)
    // this._data = data
    // this.amberFormDesign.init(data)
  }

  openPreview() {
    this.dialog.open(PreviewDialog, {
      data: {
        json: cloneDeep(this.amberFormDesign.getData())
      },
      height:'800px'
    })
  }
}
